package org.hdax.dm.client;

import org.hdax.dm.entity.item.DmItem;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(name = "dm-item-provider")
public interface DmItemClient {

    @PostMapping(path = "/findByDmitem")
    List<DmItem> findByDmitem(@RequestParam(name = "offset", defaultValue = "0") Integer offset, @RequestParam(name = "limit", defaultValue = "5") Integer limit, @RequestBody DmItem dmItem);

    @PostMapping(path = "/findById")
    DmItem findById(@RequestParam("id") Integer id);
}
